#include "ThreadPool.hpp"
#include "Task.hpp"

int main()
{
    ThreadPool<Task>* tp = new ThreadPool<Task>();
    tp->Init();
    tp->Start();
    int cnt = 10;
    while (cnt--)
    {
        // 不断地向线程池推送任务
        sleep(1);
        Task t(1, 1);
        tp->Equeue(t);
    }
    tp->Stop();
    sleep(5);
    std::cout << "thread pool stop" << std::endl;
    // Thread thread("thread", func)
    
    return 0;
}